#include "savedocdialog.h"

SaveDocDialog::SaveDocDialog()
{
f = QLatin1String("");
s = QLatin1String("");
setupUi(this);

fLineEdit->setText(f);
connect( fButton,
         SIGNAL( clicked() ),
         this,
         SLOT( select_file() ) );
}

SaveDocDialog::~SaveDocDialog()
{
}

QString SaveDocDialog::return_data()
{
return f;
}

void SaveDocDialog::select_file()
{
f = QFileDialog::getSaveFileName( this,
                                  tr("Select File"),
                                  s,
                                  tr("All Files (*);;") );
fLineEdit->setText(f);                                  
}

void SaveDocDialog::set_file_name(QString s_)
{
s.clear();
s = QDir::homePath();
s.append( QDir::separator() );
s.append(s_);
}
